<!DOCTYPE html>
<html lang="zh">

	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" type="text/css" href="../img-font/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="../css/css.css" />
		<meta http-equiv="X-UA-Compatible" content="ie=edge" />
		<script src="../js/jquery.min.js"></script>
		<script src="../js/main.js"></script>
		<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
		<script src="../js/Url.js"></script>
		<title></title>
		<style type="text/css">
			.record-external {
				width: 100%;
				height: 100%;
				background: #ebebeb;
				overflow-y: hidden;
			}
			
			.record {
				width: 100%;
				height: 40px;
				text-align: center;
				background: #666;
				line-height: 40px;
				color: #fff;
			}
			
			nav {
				width: 100%;
				height: 100%;
				background: #fff;
				overflow-y: scroll;
				font-size: 14px;
				margin-top: 50px;
				position: relative;
				overflow-y: hidden;
			}
			
			nav ul {
				display: block;
				width: 100%;
				display: flex;
				margin-top: 20px;
			}
			
			nav ul li {
				display: block;
				width: 25%;
				text-align: center;
				line-height: 30px;
			}
			
			.topnav {
				width: 100%;
				height: 30px;
				background: #eee;
				position: fixed;
				top: 0;
				left: 0;
				z-index: 666;
				padding-top: 10px;
				padding-bottom: 10px;
				padding-right: 30px;
				text-align: center;
				line-height: 30px;
			}
			
			.fanjian {
				height: 100%;
				display: block;
				color: #000;
				font-size: 24px;
				line-height: 30px;
				float: left;
				text-indent: 24px;
				position: absolute;
				top: 10px;
				left: 0;
			}
			
			.service {
				width: 200px;
				height: 200px;
				position: absolute;
				bottom: -300px;
				left: 50%;
				transform: translate(-50%, -50%);
				text-align: center;
			}
			
			.service-top {
				width: 100%;
				height: 230px;
				position: absolute;
				top: -300px;
				left: 0;
				text-align: center;
			}
			
			.service-img {
				width: 200px;
				height: 200px;
				background: #fff;
				margin: auto;
			}
			.service-img img{
				width: 100%;
				height: 100%;
			}
			button {
				width: 100px;
				height: 30px;
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate(-50%, -50%);
			}
		</style>
	</head>

	<body>
		<!--纪录列表-->
		<div class="record-external">
			<div class="topnav">
				<a href="javascript:history.go(-1)"><span class="fanjian iconfont icon-xia"></span></a>关注我们
			</div>
			<nav>
				<div class="service-top">
					<p>代理公众号</p>
					<div class="service-img"></div>
				</div>
				<div class="service">
					<p>官方公众号</p>
					<img src="../images/xsrkj.jpg" width="100%" />
				</div>
				<button>关注我们</button>
			</nav>
		</div>
	</body>

</html>
<script>
	$('button').on('click', function() {
//		console.log($(".service-top").css('top'))
		if($(".service").css('bottom') == '-300px' && $(".service-top").css('top') == '-300px') {
			$(".service").animate({
				'bottom': "-30px"
			});
			$(".service-top").animate({
				'top': "40px"
			});
		}else if($(".service").css('bottom') == '-30px' && $(".service-top").css('top') == '40px'){
				$(".service").animate({
				'bottom': "-300px"
			});
			
			$(".service-top").animate({
				'top': "-300px"
			});
			
		}

	})

	$(function() {
		$.ajax({
			type: "get",
			url: baseUrl+"/foot/user/getAgentImage",
			contentType: "application/json; charset=utf-8",
			success: function(res) {
//				console.log(res)
				var str = '<img src="' + baseUrl + '/' + res.data.imgUrl + '" width="100%"/>'
				$('.service-img').append(str)
			}
		});
	})

	var Url = baseUrl + "subpage/follow.html";
	$.ajax({
		url: '/wechat/getweixinjs',
		data: {
			url: Url
		},
		type: 'get',
		dataType: 'json',
		success: function(res) {
			console.log(res)
			wx.config({
				debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
				appId: res.data.appId, // 必填，公众号的唯一标识
				timestamp: res.data.timestamp, // 必填，生成签名的时间戳
				nonceStr: res.data.nonceStr, // 必填，生成签名的随机串
				signature: res.data.signature, // 必填，签名，见附录1
				jsApiList: ["hideMenuItems"] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
			});
		}
	})

	wx.ready(function() {
		hideMenu();
	});
	wx.error(function(res) {

	});

	function hideMenu() {
		wx.hideMenuItems({
			menuList: ["menuItem:share:email", "menuItem:copyUrl", "menuItem:share:appMessage", "menuItem:share:timeline", "menuItem:favorite", "menuItem:openWithQQBrowser", "menuItem:openWithSafari", "menuItem:share:qq", "menuItem:share:QZone"]
		});
	}
</script>